package com.eascs.workflow.timeEffective.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.eascs.app.log.Logger;
import com.eascs.app.log.LoggerFactory;
import com.eascs.workflow.common.entity.timeEffective.WorkdayEntity;
import com.eascs.workflow.common.vo.ModelResult;
import com.eascs.workflow.timeEffective.dao.WorkdayDao;
import com.eascs.workflow.timeEffective.service.WorkdayServer;

@Service
public class WorkdayServerImpl implements WorkdayServer {
	private Logger logger = LoggerFactory.getLogger(this.getClass());

	@Autowired
	private WorkdayDao workdayDao;

	@Override
	public ModelResult<List<WorkdayEntity>> queryWorkDays(Date start, Date end) {
		if (start == null || end == null) {
			return null;
		}
		ModelResult<List<WorkdayEntity>> modelResult = new ModelResult<List<WorkdayEntity>>();
		List<WorkdayEntity> model=workdayDao.queryWorkDays(start, end);
		modelResult.withModel(model);
		return modelResult;
	}


}
